<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojox/grid/resources/claroGrid.css">
<script>
    var grid, dataStore, store;
    require([
        "dojox/grid/DataGrid",
        "dojo/store/Memory",
        "dojo/data/ObjectStore",
        "dijit/MenuBar",
        "dijit/form/Button"
    ], function(DataGrid, Memory, ObjectStore, MenuBar, Button){
        store = new Memory({ data: [] });
        dataStore = new ObjectStore({ objectStore: store });
        grid = new DataGrid({
            store: dataStore,
            query: { id: "*" },
            structure: [
                [
                    { name: "<spring:message code='promo.grid.id'/>", field: "id", width: "20px"},
                    { name: "<spring:message code='promo.grid.position'/>", field: "position", width: "84px"},
                    { name: "<spring:message code='promo.grid.sname'/>", field: "sname", width: "84px"},
                    { name: "<spring:message code='promo.grid.name'/>", field: "name", width: "84px"},
                    { name: "<spring:message code='promo.grid.thname'/>", field: "thname", width: "90px"},
                    { name: "<spring:message code='promo.grid.hphone'/>", field: "hphone", width: "90px"},
                    { name: "<spring:message code='promo.grid.mphone'/>", field: "mphone", width: "94px"},
                    { name: "<spring:message code='promo.grid.email'/>", field: "email", width: "70px"},
                    { name: "<spring:message code='promo.grid.address'/>", field: "address", width: "70px"},                    
                    { name: "<spring:message code='promo.grid.age'/>", field: "age", width: "70px"},
                    { name: "<spring:message code='promo.grid.passport'/>", field: "passport", width: "100px" },
                    { name: "<spring:message code='promo.grid.status'/>", field:"status"},
                    { name: "<spring:message code='promo.grid.comm'/>", field: "comm", width: "300px"}                                       
                ]
            ]
        }, "grid");
        grid.startup();
        
        var menuBar = new MenuBar({},"menuBar" );
        menuBar.addChild(new Button({
                label:"save",
                iconClass: "dijitIconSave",
                showLabel: false
            })
        );
        menuBar.startup();
    });
</script>
<div style="margin: 10px;">
    <div id="menuBar" style="width: 100%; padding: 3px;"></div>
    <div id="grid" style="width: 100%; height: 100%"></div>
</div>
